package com.zwk2;

import java.util.Scanner;

public class Cs {

	public static void main(String[] args) {
		int[][] a = new int[7][5]; int i,j,max,sum;
		Scanner sc = new Scanner(System.in);
		System.out.println("����5��ѧ����ѧ����ѧ��������"); System.out.println("ѧ��\t��ѧ\t����\t����\t�ܷ�"); for (i=0;i<a.length-1;i++)
		for (j=0;j<a[i].length-1;j++)
		a[i][j]=sc.nextInt();
		for (j = 1; j <= 3;j++){
		max = a[0][j];
		for (i = 0; i < a.length -1; i++){
		if (max < a[i][j])
		max = a[i][j];
		a[5][j] = max;}
		for (i = 0; i < a.length - 1; i++){
		sum = 0;
		for (j = 1; j<=3;j++){
		sum = sum + a[i][j];
		}
		a[i][4]= sum;
	}
		System.out.println("ѧ��\t��ѧ\t����\t����\t�ܷ�"); 
		for (i=0;i<a.length;i++){
			for (j=0;j<a[i].length;j++)
			if(i==6 && j==0)
				System.out.print("��߷�\t"); else if (i==6 && j==4)
					System.out.print("\t"); else
					System.out.print(a[i][j]+"\t");
					System.out.println();

}
		
		}
	}
}
